﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Win32;
using intelliPaper.Model;

namespace intelliPaper.Regedit
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            //if (StartUp.StartPath != "")
            //{
            //    Paper p = intelliPaper.FileHandler.MPDHandler.ReadFromMPDFile(StartUp.StartPath);
            //    if (p != null)
            //        textBox1.Text = p.ToString();
            //    else
            //        textBox1.Text = "空文档或者未识别格式的文档";
            //}
            //else
            //{
            //    textBox1.Text = "没有任何文件载入";
            //}
            Question q = new Question();
            q.QuestionBody = this.textBox1.Text;
            q.QuestionType = "填空题";
            intelliPaper.DB.Dao.AddQuestion(q);
        }
    }
}
